<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>{% block title %}Online Sales Project{% endblock %}</title>
        {% block stylesheets %}
        <link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}" type="text/css"/>
        {% endblock %}
    </head>
    <body>
        <div class="container">
            <div id="header" class="page-header">
                <h1>Ventes en ligne</h1>    
            </div>

            
            {% if app.user %}
            <div class="nav pull-right"> {{ 'Bonjour ' ~ app.user.username ~ ' !' }}
            <a href="{{path('osp_user_logout')}}">Se déconnecter</a></div>
            {% else %}
            <div class="nav pull-right"><a href="{{path('osp_user_login')}}">Se connecter</a></div>
            {% endif %}
            

            <div class="row">
                <div id="menu" class="span3">
                    <ul class="nav nav-pills nav-stacked">
                        <li><a href="{{path('osp_home_homepage')}}">Accueil</a></li>
                        <li>Gestion du site</li>
                        <li><a href="{{path('osp_user_homepage')}}">Utilisateurs</a></li>
                        <li><a href="{{path('osp_category_homepage')}}">Catégories</a></li>
                        <li><a href="{{path('osp_product_homepage')}}">Produits</a></li>
                        <li><a href="{{path('osp_order_homepage')}}">Commandes</a></li>
                    </ul>
                </div>

                <div id="content" class="span9">
                {% block body %}{% endblock %}
                </div>
            </div>    

        
            <hr>

            <footer>
                <p>ENSIIE 1A - 2013</p>
                <p>PWEB : Antoine Ernewein - Etienne Heitz - Maxence Ory - Slimane Agouram</p>
            </footer>

        </div>
        
        {% block javascripts %}
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type ="text/javascript" src="{{ asset('js/bootstrap.js') }}"></script>
        {% endblock %}
    </body>
</html>
